import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';

import 'MyAppBar.dart';

class MyCard extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: CommonBar(title: 'flutter card 使用'),
      body: Center(
        child: _cardList(context),
      ),
    );
  }
}

//自定义card
Widget _cardList(BuildContext context) {
  return Card(
    child: Column(
      children: [
        ListTile(
          title: Text(
            '标题123131',
            style: TextStyle(fontWeight: FontWeight.w100),
          ),
          subtitle: Text('内容23131313131313131'),
          leading: Icon(
            Icons.account_circle,
            color: Colors.green,
          ),
        ),
        Divider(
          height: 1.0,
          color: Colors.grey,
        ),
        ListTile(
          title: Text(
            '标题123131',
            style: TextStyle(fontWeight: FontWeight.w100),
          ),
          subtitle: Text('内容23131313131313131'),
          leading: Icon(
            Icons.account_circle,
            color: Colors.green,
          ),
        ),
        Divider(
          height: 1.0,
          color: Colors.grey,
        ),
        ListTile(
          title: Text(
            '标题123131',
            style: TextStyle(fontWeight: FontWeight.w100),
          ),
          subtitle: Text('内容23131313131313131'),
          leading: Icon(
            Icons.account_circle,
            color: Colors.green,
          ),
        ),
      ],
    ),
  );
}
